//
//  AboutUsViewController.m
//  TravelEveryDay
//
//  Created by 路洪宇 on 15/10/22.
//  Copyright © 2015年 com.lanou3g. All rights reserved.
//

#import "AboutUsViewController.h"
#import "BaseHeader.h"
@interface AboutUsViewController ()

@end

@implementation AboutUsViewController
-(void)viewWillAppear:(BOOL)animated
{
    self.tabBarController.tabBar.hidden = NO;

}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self setUpTitleView];
    self.view.backgroundColor = [UIColor colorWithRed:0.98 green:0.97 blue:0.93 alpha:1];

}

-(void)setUpTitleView
{
    UIView *titleView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 64)];
    [titleView setBackgroundColor:TITLECOLOR];
    [self.view addSubview:titleView];
    UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [backButton setImage:[UIImage imageNamed:@"play-jiantouzuo.png"] forState:UIControlStateNormal];
    [backButton setFrame:CGRectMake(10, 30, 22, 22)];
    [backButton addTarget:self action:@selector(leftClick) forControlEvents:UIControlEventTouchUpInside];
    [titleView addSubview:backButton];
    
    UILabel *title = [[UILabel alloc] initWithFrame:CGRectMake(SCREEN_WIDTH/2-100, 25, 200, 30)];
    [title setText:@"关于我们"];
    [title setTextColor:[UIColor whiteColor]];
    title.font = [UIFont systemFontOfSize:19.];
    title.textAlignment = NSTextAlignmentCenter;
    [titleView addSubview:title];
    
    
    [self.view addSubview:titleView];
    [self setContent];
}

-(void)setContent
{
    UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH/2-50, 120, 100, 100)];
    imageView.layer.cornerRadius = 50;
    imageView.layer.masksToBounds = YES;
    [imageView setImage:[UIImage imageNamed:@"icon4.png"]];
    [self.view addSubview:imageView];
    
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(imageView.frame.origin.x, imageView.frame.size.height+imageView.frame.origin.y+10, 100, 30)];
    label.textAlignment = NSTextAlignmentCenter;
    label.text = @"当前版本 1.0.0";
    label.font = [UIFont systemFontOfSize:13.];
    label.textColor = [UIColor grayColor];
    [self.view addSubview:label];
    
    UILabel *contentLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, label.frame.size.height+label.frame.origin.y+10, SCREEN_WIDTH-40, 100)];
    contentLabel.text = @"    简·行是热爱自由行旅行者口碑相传的选择,覆盖国内外目的地的攻略,游记,问答,点评等用户真实分享的信息,并且提供交通,当地游等旅行产品,心若自由,行必无忧!自由行,简单行!";
    contentLabel.numberOfLines = 0;
    contentLabel.font = [UIFont systemFontOfSize:15.];
    contentLabel.textColor = [UIColor grayColor];
    [self.view addSubview:contentLabel];
    
    UILabel *qqLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, contentLabel.frame.size.height+contentLabel.frame.origin.y+100, SCREEN_WIDTH-40, 30)];
    qqLabel.text = @" QQ :          315483634";
    qqLabel.textAlignment = NSTextAlignmentLeft;
    qqLabel.font = [UIFont systemFontOfSize:15.];
    qqLabel.textColor = [UIColor grayColor];
    [self.view addSubview:qqLabel];
    
    UILabel *phoneLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, qqLabel.frame.size.height+qqLabel.frame.origin.y+5, SCREEN_WIDTH-40, 30)];
    phoneLabel.text = @"手机:          15344271100";
    phoneLabel.textAlignment = NSTextAlignmentLeft;
    phoneLabel.font = [UIFont systemFontOfSize:15.];
    phoneLabel.textColor = [UIColor grayColor];
    [self.view addSubview:phoneLabel];
}

-(void)leftClick
{
#pragma mark- 返回指定页面
    UIViewController *vc =[self.navigationController.viewControllers objectAtIndex:0];
    [self.navigationController popToViewController:vc animated:YES];
    self.tabBarController.tabBar.hidden = NO;
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
